<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>购物车</title>
    <link rel="stylesheet" href="/libs/bootstrap/bootstrap.min.css">
    <link rel="stylesheet" href="/css/cart.css">
    <script src='/libs/jquery/jquery-3.2.1.js'></script>
    <script src='/libs/bootstrap/bootstrap.min.js'></script>
</head>

<body>
    <header></header>
    <section>
        <div class="carts">
            <div class="carts-top">
                <p>购物清单</p>
            </div>
            <div class="carts-null"></div>
            <div class="carts-contect">
                <div class="noLogin">
                    <span>您还没有登录！登录后可查看之前加入的商品</span>
                    <div>
                        <a href="/html/login.html" target="_blank">登录</a>
                    </div>
                </div>
                <div class="shop">
                    <div class="infoHead">
                        <span>商品信息</span>
                        <span>单价</span>
                        <span>数量</span>
                        <span>小计</span>
                        <span>操作</span>
                    </div>
                    <div class="shopMessage"></div>
                    <script type="text/html" id="shopCart-template">
                        {{each cart shop}}
                        <ul class="shop-top" data-id="{{shop.id}}">
                        <li class="chooseBg">
                          <input type="checkbox" class="check" {{shop.check && "checked"}}>
                        </li>
                        <li class="shopImg">
                            <img src="{{shop.imgs[0]}}" alt="">
                        </li>
                        <li class="shopInfo">{{shop.name}}</li>
                        <li class="shopPrice">￥{{shop.price}}</li>
                        <li class="shopNum" data-id="{{shop.id}}">
                            <span class="cut">-</span>
                            <span class="num">{{shop.num}}</span>
                            <span class="add">+</span>
                            <span class="promt"></span>
                        </li>
                        <li class="shopSubtotal">{{shop.num*shop.price}}</li>
                        <li class="shopClear">
                            <span class="Delete" data-id="{{shop.id}}">删除</span>
                            <div class="shopClearModel">
                                <p>您确认要删除该商品吗？</p>
                                <div>
                                    <button>是</button>
                                    <button>否</button>
                                </div>
                                <!-- <img src="/images/icon33.png" alt=""> -->
                            </div>
                        </li>
                        </ul>
                        {{/each}}
                    </script>

                    <div class="nullCart">
                        <div></div>
                        <p>您的购物车中还没有商品</p>
                        <a href="/html/shop.html" target="_self">现在选购</a>
                    </div>
                </div>
                <div class="shopStatement">
                    <input type="checkbox" id="allcheck">
                    <span class="spanAll">全选</span>
                    <div class="allDelete">
                        <!-- <span class="spanDelete">删除</span> -->
                        <div class="allDeleteModel">
                            <p>您确认要删除已勾选商品吗？</p>
                            <div>
                                <button>是</button>
                                <button>否</button>
                            </div>
                            <!-- <img src="/images/icon33.png" alt=""> -->
                        </div>
                        <div class="allChoose">
                            <p>请选择您要删除的商品！</p>
                            <!-- <img src="/images/icon33.png" alt=""> -->
                            <span>x</span>
                        </div>
                    </div>
                    <div class="all">
                        <p>总计：<span id="allMoney"></span></p>
                        <p>已选择&nbsp;<span id="cartNumber">1</span>&nbsp;件商品，优惠：<span>￥0.00</span></p>
                    </div>
                    <button>立即结算</button>

                </div>
            </div>

        </div>
        <div class="carts-sum"></div>
        </div>
    </section>
    <footer></footer>
</body>
<script src="/libs/requirejs/require.min.js" data-main="/js/cart"></script>

</html>